package com.darsn.fowtle.core.common;

import org.apache.commons.lang.StringUtils;

public final class Guard {
	
	public static void assertNotNull(Object obj, String parameterName) throws IllegalArgumentException {
		if (obj == null) {
			throw new IllegalArgumentException(parameterName);
		}
	}
	
	public static void assertNotBlank(String parameter, String parameterName) throws IllegalArgumentException {
		if (StringUtils.isBlank(parameter)) {
			throw new IllegalArgumentException(parameterName);
		}
	}
}
